import React, { PureComponent } from 'react';
import { View, Text, Image, StyleSheet, Dimensions } from 'react-native';
import { adapt } from '~/utils/ScreenAdapter';
import { DefaultStyles } from '~/styles/GlobalStyles';

export default class YiEmpty extends PureComponent {
  render() {
    return (
      <View style={{ alignItems: 'center' }}>
        <View
          style={{
            marginTop: this.props.top
              ? this.props.top
              : adapt(Dimensions.get('screen').height / 5),
          }}
        >
          <Image
            source={require('../../assets/images/agent_empty.png')}
            style={styles.image}
          />
          <Text style={styles.text}>{this.props.title || ''}</Text>
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  image: {
    width: adapt(180),
    height: adapt(90),
  },
  text: {
    ...DefaultStyles.Regular,
    color: DefaultStyles.Black32,
    fontSize: adapt(14),
    textAlign: 'center',
    marginTop: adapt(20),
  },
});
